<%= form_for(@article) do |f| %>
    <% if @article.errors.any? %>
        <div id="errorExplanation">
          <h2><%= pluralize(@article.errors.count, "error") %> 错误使这篇文章不能存储</h2>
          <ul>
            <% @article.errors.full_messages.each do |msg| %>
                <li><%= msg %></li>
            <% end %>
          </ul>
        </div>
    <% end %>

    <div class="field">
      <%= f.label :title %><br />
      <%= f.text_field :title %>
    </div>

    <div class="field">
      <%= f.label :body %><br />
      <%= f.text_area :body %>
    </div>

    <div class="actions">
      <%= submit_or_cancel(f) %>
    </div>
<% end %>